const routes = [
  {
    path:"/",
    component:()=>import("@/views/login/index.vue"),
    name:"login",
    meta:{
      isShow:false,
      isAuth:false,
      title:"登录"
    }
  },
  {
    path:"/layout",
    component:()=>import("@/layout/index.vue"),
    redirect:"/home",
    name:"layout",
    meta:{
      isShow:false,
      isAuth:true
    },
    children:[
      {
        path:"/home",
        component:()=>import("@/views/home/index.vue"),
        name:"home",
        meta:{
          icon:"el-icon-s-home",
          title:"首页",
          isShow:true,
          isAuth:true
        }
      }
    ]
  },
  {
    path:"/auth",
    name:"auth",
    component:()=>import("@/layout/index.vue"),
    meta:{
          icon:"el-icon-s-management",
          title:"用户权限管理",
          isShow:true,
          isAuth:true
    },
    children:[
      {
        path:"/auth/user",
        component:()=>import("@/views/auth/user/index.vue"),
        name:"user",
        meta:{
          icon:"el-icon-user",
          title:"用户管理",
          isShow:true,
          isAuth:true
        }
      },
      {
        path:"/auth/role",
        component:()=>import("@/views/auth/role/index.vue"),
        name:"role",
        meta:{
          icon:"el-icon-male",
          title:"角色管理",
          isShow:true,
          isAuth:true
        }
      },
      {
        path:"/auth/permission",
        component:()=>import("@/views/auth/permission/index.vue"),
        name:"permission",
        meta:{
          icon:"el-icon-star-off",
          title:"权限管理",
          isShow:true,
          isAuth:true
        }
      },
    ]
  },
  {
    path:"/notfound",
    component:()=>import("@/views/404/index.vue"),
    name:"notfound",
    meta:{
      isShow:false,
      isAuth:false
    }
  },
  {
    path:"/:pathMatch(.*)*",
    redirect:"/notfound",
    name:"any",
    meta:{
      isShow:false,
      isAuth:false
    }
  },
];

export default routes;
